home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / CMaster Demo v2.0.3 / Extra Goodies / Some Sample Glossaries-README < prev    next >
Encoding:
Text File  |  1994-08-17  |  4.3 KB  |  267 lines  |  [TEXT/KAHL]

  1. Hello,
  2. If you use Think C/C++ and CMaster, you should get the new 2.0 update!
  3. It is VERY cool and adds many new and useful features.  One of these new
  4. features is the new "Glossary" feature.  Do you get tired of typing the same
  5. constructs over and over?  Well, this feature will change that.
  6.  
  7. I've included a sample prefs file with this that has the following glossary
  8. entries defined.  Some of these contain stuff you'll want to change,
  9. but many will be usable right off.  I've included a note about what each
  10. one does below. If you copy them, make sure that you order the Glossaries in a numerically increasing manner with no gaps. Also, don't forget to copy over the 
  11. help strings in the STR# resource!
  12.  
  13. If you create any cool glossary entries, please post them or send to Jersey 
  14. so they can include them on future update disks! :-)
  15.  
  16. peace,
  17. tyler morrison
  18.  
  19.  
  20. mc  (modification comment, note you'll change the initials at the end.)
  21.  
  22. // Modified 6/17/94 — 3:01 PM.tbm
  23.  
  24.  
  25. if        (plain old if)
  26.  
  27. if ( •• )
  28. {
  29.     ••
  30. }
  31.  
  32.  
  33. ife     (if/else)
  34.  
  35. if ( •• )
  36. {
  37.     ••
  38. }
  39. else
  40. {
  41.     ••
  42. }
  43.  
  44.  
  45. bf         (boolean function)
  46.  
  47. Boolean •foo•( •arg• )
  48. {
  49.     Boolean result = false;
  50.  
  51.     ••
  52.  
  53.     return ( result );
  54. }
  55.  
  56.  
  57. osf         (oserr function)
  58.  
  59. OSErr •foo•( •arg• )
  60. {
  61.     OSErr result = noErr;
  62.  
  63.     •body•
  64.  
  65.     return ( result );
  66. }
  67.  
  68.  
  69. i         (include with "")
  70.  
  71. #include "•filename•.h"
  72.  
  73.  
  74. is         (include system, so use <>)
  75.  
  76. #include <•filename•.h>
  77.  
  78.  
  79. d         (#define preprocessor macro)
  80.  
  81. #define    •thing•
  82.  
  83.  
  84. po         (#pragma once preprocessor macro)
  85.  
  86. #pragma once
  87.  
  88.  
  89. pm         (#pragma mark preprocessor macro for CMaster)
  90.  
  91. #pragma mark •what•
  92.  
  93.  
  94. st         (String 255 definition because I can't touch type numbers :-).
  95.  
  96. Str255  
  97.  
  98.  
  99. while      (while loop template - I don't use much or it would be "wh" :-).
  100.  
  101. while ( •condition• ) 
  102. {
  103.     •body•
  104. }
  105.  
  106.  
  107. s         (for short definition)
  108.  
  109. short 
  110.  
  111.  
  112. l             (for long def)
  113.  
  114. long 
  115.  
  116.  
  117. class         (simple class template)
  118.  
  119. class •ClassName• : public •ParentName• 
  120. {
  121.     public:
  122.         • •
  123.     protected:
  124.         • •
  125.     private:
  126.         • •
  127. };
  128.  
  129.  
  130. sw             (switch statement template)
  131.  
  132. switch ( •on what• )
  133.  {
  134.         case •a•:
  135.                 • •
  136.             break;
  137.  
  138.         case •b•:
  139.                 • •
  140.             break;
  141.  
  142.         case •c•:
  143.                 • •
  144.             break;
  145. }
  146.  
  147.  
  148. v             (for void, might want to switch with virtual if you use that more)
  149.  
  150. void 
  151.  
  152.  
  153. for         (for loop template)
  154.  
  155. for ( ••; ••; •• ) 
  156. {
  157.     ••
  158. }
  159.  
  160.  
  161. head        ( C file header I use, note that you'll need to put your name in it)
  162.  
  163. /*
  164. *
  165. * FILE:    •FileName•
  166. *
  167. * PURPOSE:
  168. *        •purpose•
  169. *
  170. * NOTES:
  171. *        •notes•
  172. *
  173. *    Copyright © 1994 YOUR NAME HERE.  All Rights Reserved.
  174. *
  175. * Modification History:
  176. *    When        Who        What
  177. *    
  178. */
  179.  
  180.  
  181. rtn            (the comment I put in front of every (well, almost every) routine).
  182.             (note that I made a macro that I execute after selecting a routine name at
  183.             it's implementation or prototype and it copies the name, executes the rtn
  184.              glossary item, pastes the name into selected Method/RoutineName and then
  185.              goes to the purpose field).  This is included as a sample macro in this
  186.              package as well I think).
  187.  
  188. /***************************************************************
  189. * • Method/RoutineName •
  190. *
  191. *    PURPOSE:    • purpose •
  192. *
  193. *    NOTES:        
  194. *
  195. *    RETURNS:    
  196. *
  197. ***************************************************************/
  198.  
  199.  
  200. td             (typedef)
  201.  
  202. typedef 
  203.  
  204.  
  205. tds            (typedef for my standard structs I seem to use everywhere)
  206.             (I'm thinking about making versions without the hand def on the end...)
  207.             (I'm also going to look into the applescript interface soon to see about
  208.              automating the name pasting etc.)
  209.     
  210. typedef struct {
  211.     • •;
  212. } •Name•Rec, *•Name•Ptr, **•Name•Hand;
  213.  
  214.  
  215. ds             (DebugString quickie)
  216.  
  217. DebugStr( "\p ••" );
  218.  
  219.  
  220. dr            (DebugString with routine name starting string)
  221.  
  222. DebugStr("\p«FunctionName»: •error• " );
  223.  
  224.  
  225. ifdd        (if def debugging my std debugging symbol, should prob be id ?)
  226.  
  227. #ifdef DEBUGGING
  228.     •what•
  229. #endif
  230.  
  231.  
  232. ifdds        (if def debugging with debugstr in it, should prob be idds)
  233.  
  234. #ifdef DEBUGGING
  235.     DebugStr( "\p ••" );
  236. #endif
  237.  
  238.  
  239. cl            (comment line)
  240.  
  241. //-------------------------------------------------------------------
  242.  
  243.  
  244. // MACRO EXAMPLE, Assumes "rtn" defined above.
  245. //                    NOTE -- this macro kills the clipboard!
  246. //                        -- Also, I have my "glossary, find and hilite next"
  247. //                            with a key equivalent to cmd-tab
  248. //                            you'll need to do this as well...
  249. //
  250.  
  251. /***************************************************************
  252. * someRoutine
  253. *
  254. *    PURPOSE:    • purpose •
  255. *
  256. *    NOTES:        
  257. *
  258. *    RETURNS:    
  259. *
  260. ***************************************************************/
  261.  
  262.  
  263.  
  264. short someRoutine( short foo )
  265. {
  266.  
  267. }